<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title><@spring.message '上传窗口' /></title>
<#include "/admin/main/include/link_head.ftl"/>
</head>

<body class="jr-body">
<@tags.editBtns btns="close,choose" />
<!-- main content start-->
<div style="padding-top: 70px;height: 99%;position: absolute;top: 0;left: 0;width: 100%;">
    <!--body wrapper start-->
    <div class="wrapper">
        <div class="row">
            <div class="col-md-4">
            <@tags.table id="easyui-datagrid-left" options="bodyCls:'jr-easyui-body jr-no-pagination-info',
                    singleSelect:true,
                    url:'folderPage.do',
                    onSelect:'leftOnSelect',
                    pagination:false,
                    onLoadSuccess:'leftOnLoadSuccess'">
                <@tags.th options="field:'name',width:260"><@spring.message '文件夹名称' /></@tags.th>
            </@tags.table>
        <@tags.gridBtns id="tbMain" btns="search,add,remove" urls="add:'folderEdit.do',remove:'folderDelete.do'" />
        <@tags.gridCons gridId="easyui-datagrid-left" forms="[
                        {
                            type:'text',
                            field:'name',
                            op:'like',
                            text:'文件夹',
                            tip:'文件夹名称'
                        }
                    ]" />
            </div>
            <div class="col-md-8">
            <#if singleSelect=='true'>
                <#assign haveOnDblClickRow="onDblClickRow:'rightOnDblClickRow'," />
            </#if>
            <@tags.table id="easyui-datagrid-right" options="singleSelect:${singleSelect!'false'},
                        toolbar:'#tbSlave',
                        queryParams:{
                               'search.eq.folderId':'null'
                        },
                       ${haveOnDblClickRow!''}
                        pageSize:'50'
                    ">
                <@tags.th options="field:'ck',checkbox:true"></@tags.th>
                <@tags.th options="field:'fileExtension',width:100,formatter:'forPreview',align:'center'"><@spring.message '文件类型' /></@tags.th>
                <@tags.th options="field:'oldFileName',width:260,halign:'center'"><@spring.message '原文件名' /></@tags.th>
                <@tags.th options="field:'fileSize',width:100,align:'right',formatter:'forFileSize'"><@spring.message '文件大小' /></@tags.th>
            </@tags.table>
            <@tags.gridBtns id="tbSlave" btns="search,upload,remove" />
            <@tags.gridCons gridId="easyui-datagrid-right" forms="[
                        {
                            type:'text',
                            field:'oldFileName',
                            op:'like',
                            text:'原文件名'
                        }
                    ]" />
            </div>
        </div>
    </div>
    <!--body wrapper end-->
</div>
<!-- main content end-->

</body>
</html>
<#include "/admin/main/include/link_foot.ftl"/>
<script type="text/javascript" src="<@spring.url '${pluginPath}/js/list.js' />"></script>
<script type="text/javascript">
    function openerSet() {
        var selectedFiles = $("#easyui-datagrid-right").datagrid("getChecked");
        opener.${fun}(selectedFiles,window);
    }
</script>